[#353] Add NEW tag on story cards for recent plot activity#366
[#353] Add NEW tag on story cards for recent plot activity#366realproject7 merged 2 commits intomainfrom
Conversation
Show "NEW" badge next to plot count when last_plot_time is within 24 hours. Pure frontend check, no DB changes needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
LGTM. Clean 4-line addition — NEW badge renders inline when last_plot_time is within 24h. Null-safe check on last_plot_time. Approved.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The PR matches issue #353 and adds the NEW badge next to plot count only when last_plot_time is within the last 24 hours. The change is minimal, frontend-only, and follows the implementation described in the issue without introducing broader logic changes.
Findings
- No correctness or design issues found in the submitted diff.
Decision
Approved on code review. lint-and-typecheck was still pending at the time of review, so merge should still wait for required GitHub checks.
React Compiler flags Date.now() as impure during render. Extract the 24h check into a standalone function to satisfy the lint rule. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
LGTM on re-review. Date.now() moved to pure helper outside render, isNew computed once at top. React Compiler purity satisfied. Approved.
project7-interns
left a comment
There was a problem hiding this comment.
Re-review after the lint fix: no new correctness or design issues found. Moving the Date.now() usage into isWithin24h() preserves the intended 24-hour badge behavior while addressing the React Compiler purity complaint. lint-and-typecheck was still pending again at the time of re-review.
Summary
last_plot_timeis within the last 24 hoursFixes #353
Files changed
src/components/StoryCard.tsx— 4-line additionTest plan
next buildpasses🤖 Generated with Claude Code